package com.zzedu.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zzedu.domain.ZzSchool;
import com.zzedu.dto.ZzSchoolDTO;
import com.zzedu.vo.ZzSchoolReportVO;
import com.zzedu.vo.ZzSchoolVO;

import java.util.List;

/**
 * 学校管理Service接口
 *
 * @author Mr.Wang
 * @date 2025-01-27
 */
public interface IZzSchoolService extends IService<ZzSchool> {
    /**
     * 构造查询条件
     */
    public LambdaQueryWrapper<ZzSchool> buildQuery(ZzSchoolDTO zzSchoolDTO);

    List<ZzSchoolVO> convertVO(List<ZzSchool> zzSchoolList);

    List<ZzSchoolReportVO> convertSchoolVO(List<ZzSchool> zzSchoolList);

    /**
     * 创建学校
     *
     * @param zzSchoolDTO
     * @return
     */
    boolean save(ZzSchoolDTO zzSchoolDTO);

    /**
     * 修改校区
     *
     * @param zzSchoolDTO
     * @return
     */
    boolean updateById(ZzSchoolDTO zzSchoolDTO);

    /**
     * 当前登录校区ID 是否为测试校区
     *
     * @return
     */
    boolean isTestSchoolFlag(Long id);

    void refreshCache(Long id);

    void refreshCacheAll();
}
